unit CalcMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, DBTables, Grids, DBGrids;

type
  TForm1 = class(TForm)
    Database1: TDatabase;
    Table1: TTable;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    Table1customer_num: TIntegerField;
    Table1fname: TStringField;
    Table1lname: TStringField;
    Table1company: TStringField;
    Table1address1: TStringField;
    Table1address2: TStringField;
    Table1city: TStringField;
    Table1state: TStringField;
    Table1zipcode: TStringField;
    Table1phone: TStringField;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
  Field: TField;
begin
  //Table1.Open;
  //Table1.Close;
  Field := TStringField.Create(Table1);
  Field.FieldName := 'calctest';
  Field.Size := 20;
  Field.FieldKind := fkCalculated;
  Field.Calculated := True;
  Field.DataSet := Table1;
  Field.Index := 0;
  Table1.Open;
  Table1.Edit;
  Field.Value := 'asdfasdf';
end;

end.
